/* ==================== 产品卡片样式（通用） ==================== */

/* 产品容器 - 充分利用内容区域宽度 */
.products-container {
  margin: 24px 0;
  width: 100%;
  max-width: 100%;
}

/* 在内容区域内，让产品容器占满可用宽度，减少左右间距 */
.vp-doc .products-container {
  margin-left: -24px;
  margin-right: -24px;
  padding-left: 16px;
  padding-right: 16px;
}

/* 在文档内容中，产品容器占满整个内容宽度 */
.VPDoc .products-container {
  max-width: none !important;
  width: calc(100% + 48px) !important;
  margin-left: -24px !important;
  margin-right: -24px !important;
  padding-left: 16px !important;
  padding-right: 16px !important;
}

/* 产品网格布局 - 优化间距和列数 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 20px 0;
  width: 100%;
}

/* 产品卡片 */
.product-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  border-color: var(--vp-c-brand-2);
}

/* 产品图标 */
.product-icon {
  font-size: 48px;
  margin-bottom: 16px;
  line-height: 1;
}

/* 产品标题 */
.product-title {
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 12px 0;
  line-height: 1.4;
}

/* 产品描述 */
.product-description {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin: 0 0 16px 0;
  flex-grow: 0;
}

/* 产品特点列表 */
.product-features {
  list-style: none;
  padding: 0;
  margin: 0 0 20px 0;
  flex-grow: 1;
}

.product-features li {
  font-size: 14px;
  color: #4b5563;
  line-height: 1.8;
  padding-left: 20px;
  position: relative;
  margin-bottom: 8px;
}

.product-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--vp-c-brand-1);
  font-weight: bold;
}

/* 产品链接按钮 */
.product-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--vp-c-brand-1);
  color: white !important;
  text-decoration: none !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  margin-top: auto;
  text-align: center;
}

.product-link:hover {
  background: var(--vp-c-brand-3);
  transform: translateX(2px);
}

/* 响应式设计 - 移动端 */
@media (max-width: 768px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .product-card {
    padding: 20px;
  }
  
  .product-icon {
    font-size: 40px;
  }
  
  .product-title {
    font-size: 18px;
  }
  
  .product-link {
    width: 100%;
    min-height: 44px;
  }
}

/* 响应式设计 - 平板 */
@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* 响应式设计 - 桌面端 */
@media (min-width: 1025px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* 暗色模式适配 */
.dark .product-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border-color: #334155;
}

.dark .product-card:hover {
  border-color: var(--vp-c-brand-2);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.dark .product-title {
  color: #f9fafb;
}

.dark .product-description {
  color: #94a3b8;
}

.dark .product-features li {
  color: #cbd5e1;
}

.dark .product-features li::before {
  color: var(--vp-c-brand-2);
}
